    <div id="menu_principal" class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix">        
        <span class="ui-dialog-title" id="ui-dialog-title-dialog">
            <ul>
                <li>
                    <a tabindex="0" href="<?php echo base_url(); ?>home" class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-top" id="menuHome"><span class="ui-icon homeIcon"></span>Home</a>                        
                </li>
                <?php 
                $menus = $this->session->userdata('v_menu');
                if (isset($menus) && !empty($menus))
                {
                foreach ($this->session->userdata('v_menu') as $n1) 
                {
                ?>
                <li>
                	<?php 
                	if ($n1->hasChildren)
                	{
                	?>
                    <a tabindex="1" href="#menu-<?php echo $n1->controlador; ?>" class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-top" id="menu<?php echo $n1->controlador;?>"><span class="ui-icon ui-icon-triangle-1-s"></span><?php echo utf8_decode($n1->titulo); ?></a>                        
					<div id="menu-<?php echo $n1->controlador; ?>" class="hidden">
						<ul>
							<?php 
							foreach ($n1->ChildNodes as $n2) 
							{
							?>
							<li>
								<a href="<?php echo base_url().$n2->controlador; ?>"><?php echo utf8_decode($n2->titulo); ?></a>
								<?php 
								if ($n2->hasChildren)
								{
								?>
								<ul>
								<?php 
								foreach ($n2->ChildNodes as $n3) 
								{
								?>
									<li>
										<a href="<?php echo base_url().$n3->controlador; ?>"><?php echo utf8_decode($n3->titulo); ?></a>
									<?php 
									if ($n3->hasChildren)
									{
									?>
										<ul>
										<?php 
										foreach ($n3->ChildNodes as $n4) 
										{
									    ?>
									    	<li>
												<a href="<?php echo base_url().$n4->controlador; ?>"><?php echo utf8_decode($n4->titulo); ?></a>
									    	</li>
									    <?php
										}
										?>
										</ul>
									<?php    
									}
									?>
									</li>
								<?php
								}
								?>
								</ul>
								<?php 
								}
								?>
							</li>
							<?php 
							}
							?>
						</ul>
					</div>
					<?php 
                	}
                	else
                	{
					?>
                    <a tabindex="1" href="<?php echo base_url().$n1->controlador; ?>" class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-top" id="menu<?php echo $n1->controlador;?>"><span class="ui-icon ui-icon-triangle-1-s"></span><?php echo utf8_decode($n1->titulo); ?></a>                        
					<?php 
                	}
					?>
                </li>
                <?php 
                }
                }
                ?>
                <li>
                    <a tabindex="0" href="<?php echo base_url(); ?>login/logout" class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-top" id="menuSair"><span class="ui-icon cancelIcon"></span>Sair</a>                        
                </li>
            </ul>                
        </span>
    </div>
	<div id="corpo">
	    <table width="100%" border="0" cellpadding="0" cellspacing="0">
	      <tr style="background:url(<?php echo base_url(); ?>images/bg_transparente.jpg);">  
    